package com.mashibing.common.exception;

import com.mashibing.common.enums.ExceptionEnums;
import lombok.Getter;

/**
 * @ClassName:Api
 * @author:[开发者名称]
 * @Description:[类的功能描述]
 * @Date:2025/9/16/20:09
 * @Version:1.0
 */
@Getter
public class ApiException extends RuntimeException{
    private Integer code;

    public ApiException(String message, Integer code) {
        super(message);
        this.code = code;
    }


    public ApiException(ExceptionEnums enums) {
        super(enums.getMsg());
        this.code = enums.getCode();
    }
}
